package com.unknowpupil.design.proxy.dynamicProxy;


import java.lang.reflect.Proxy;

/**
 * @Description: <p>
 *
 * </p>
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2020/4/27 17:15
 * @Classname: Client
 * @Version: 1.0
 */
public class Client {
    public static void main(String[] args) {
        Star realStar = new RealStar();
        StarHandler handler = new StarHandler(realStar);
        Star proxy = (Star) Proxy.newProxyInstance(ClassLoader.getSystemClassLoader(), new Class[]{Star.class}, handler);
        proxy.sing();

    }
}
